package com.app.milkteaapp.utils;

import com.google.gson.Gson;

public class GsonUtils {

    public static <T> T fromJson(String jsonObject, Class<T> clas) {
        Gson gson = new Gson();
        T fromJson = gson.fromJson(jsonObject, clas);
        return fromJson;
    }

    public static String toJson(Object s) {
        Gson gson = new Gson();
        String json = gson.toJson(s);
        return json;
    }
}
